import { Injectable, NestMiddleware } from '@nestjs/common'
import { Request, Response, NextFunction } from 'express'

@Injectable()
export class LoggerMiddleware implements NestMiddleware {
    use(req: Request, res: Response, next: NextFunction){
        console.log('LoggerMiddleware request....')
        next()
    }
}


// 函数中间件
export function logger(req, res, next){
    console.log('函数中间件....')
    next()
}
